/*
 * DBManager.hh
 *
 *  Created on: Nov 10, 2012
 *      Author: Zermingore
 */

#ifndef DBMANAGER_HH_
#   define DBMANAGER_HH_

#include "common/stl.h"

class DBManager
{
    public:
        DBManager();
        ~DBManager();

        // mv to src/db/{users|account}
        /** Allows the user to connect to the game
         ** \param login: user's login
         ** \param password: user's password
         ** \return true on successful authentication
         */
        bool authenticate(std::string login, std::string password);

        void init(int, char *argv[]);

        bool doTransaction();

    private:
        pqxx::connection *_c; /// the connection we'll use during all game
 };

#endif /* DBMANAGER_HH_ */
